<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/jsp/common/head.jsp"%>
<div class="right">
            <div class="location">
                <strong>你现在所在的位置是:</strong>
                <span>密码修改页面</span>
            </div>
            <div class="providerAdd">
                <form id="userForm" name="userForm" method="post" action="${pageContext.request.contextPath }/user?opr=up">
                    <input type="hidden" name="method" value="up">
                    <input type="hidden"  value="${userSession.userPassword}" id="userpwd">
                    <input type="hidden" name="userCode" value="${userSession.userCode}">
                    <!--div的class 为error是验证错误，ok是验证成功-->
                    <div class="info">${message}</div>
                    <div class="">
                        <label for="oldPassword">旧密码：</label>
                        <input type="password" name="oldpassword" id="oldpassword" value="" onblur="check()"> <span id="out"></span>
						<font color="red"></font>
                    </div>
                    <div>
                        <label for="newPassword">新密码：</label>
                        <input type="password" name="userPassword" id="newpassword" value=""> 
						<font color="red"></font>
                    </div>
                    <div>
                        <label for="reNewPassword">确认新密码：</label>
                        <input type="password" name="rnewpassword" id="rnewpassword" value="" onblur="pwd()"> <span id="xer"></span>
						<font color="red"></font>
                    </div>
                    <div class="providerAddBtn">
                        <!--<a href="#">保存</a>-->
                        <input type="submit" name="save" id="save" value="保存" class="input-button">
                    </div>
                </form>
            </div>
        </div>
    </section>
<%@include file="/jsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/pwdmodify.js"></script>


<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	function check(){
		var userpwd = $("#userpwd").val(); //原密码
		var newpwd= $("#oldpassword").val(); //旧密码
		if(userpwd!=newpwd){
			$("#out").text("旧密码错误");
		}else{
			$("#out").text("密码正确");
		}
	}
	
	function pwd(){
		var newpwd= $("#newpassword").val(); //新密码
		var xerpwd= $("#rnewpassword").val(); //确认新密码
		if(newpwd!=xerpwd){
			$("#xer").text("两次输入的密码不一致！");
		}else{
			$("#xer").text("密码一致！");
		}
		
	}
</script>
